home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
minix
/
up1510b.tgz
/
up1510b
/
src
/
test
/
test12.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-07-23
|
462b
|
27 lines
/* test 12 */
/* Copyright (C) 1987 by Martin Leisner. All rights reserved. */
/* Used by permission. */
#include <stdio.h>
#define NUM_TIMES 1000
main()
{
register int i;
int k;
printf("Test 12 ");
fflush(stdout); /* have to flush for child's benefit */
for (i = 0; i < NUM_TIMES; i++) switch (fork()) {
case 0: exit(); break;
case -1:
printf("fork broke\n");
exit();
default: wait(&k); break;
}
printf("ok\n");
}